﻿using CrawlerApp.Core.Entities;
using CrawlerApp.Core.Entities.BookAggregate;
using CrawlerApp.Infrastructure.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;

namespace CrawlerApp.Infrastructure.Services
{
    public interface IBookRepository : IRepository<Book>
    {
        Task<IReadOnlyCollection<Book>> GetBookByAuthorAsync(string author, CancellationToken cancellationToken = default);
        Task<IReadOnlyCollection<Book>> GetBookListByCategoryAsync(string categoryName, CancellationToken cancellationToken = default);
        Task<IReadOnlyCollection<BookRank>> GetBookRanksAsync(Expression<Func<BookRank, int>> order, CancellationToken cancellationToken = default);
    }
}
